


Ext.define('DDMS.view.Register', {
    extend: 'Ext.form.Panel',
    
    id:'register',
    config: {
    	defaults: {
            width:'90%'
        },
        layout: {
            type: 'vbox',
            align:'center'
        },
        scrollable:false,
        items: [
            {
                xtype: 'fieldset',
                defaults: {
                	height:50,
		            style:'font-size:16pt;'
		        },
		        title:'<div style="text-align:left;font-size:16pt;">基本信息</div>',
		        instructions:' ',
                items: [
                    {
                        xtype: 'textfield',
                        label: '姓名*'
                    },
                    {
                        xtype: 'selectfield',
                        label: '性别*',
                        options: [
                            {
                                text : '男',
                                value: '0'
                            },
                            {
                                text : '女',
                                value: '1'
                            }
                        ]
                    },
                    {
                        xtype: 'textfield',
                        label: '手机号码*'
                    }
                ]
            },
             {
                xtype: 'fieldset',
                defaults: {
                	height:50,
		            style:'font-size:16pt;'
		        },
		        title:'<div style="text-align:left;font-size:16pt;">登录信息</div>',
		        instructions:' ',
                items: [
                    {
                        xtype: 'textfield',
                        label: '用户名*'
                    },
                    {
                        xtype: 'passwordfield',
                        label: '登录密码*'
                    },
                    {
                        xtype: 'passwordfield',
                        label: '确认密码*'
                    }
                ]
            },
            {
                xtype: 'fieldset',
                defaults: {
                	height:50,
		            style:'font-size:16pt;'
		        },
		        title:'<div style="text-align:left;font-size:16pt;">详细信息</div>',
		        instructions:'<br><br><br>',
                items: [
                	{
                        xtype: 'textfield',
                        label: '部门*'
                    },
                    {
                        xtype: 'textfield',
                        label: '专业类别'
                    },
                    {
                        xtype: 'textfield',
                        label: '电子邮件'
                    },
                    {
                        xtype: 'emailfield',
                        label: '详细地址'
                    }
                ]
            },
            {
                xtype: 'button',
                text: '<font size=5>创建</font>',
                ui: 'normal',
                handler:function(){
                	Ext.Msg.show({
						title:"信息提示",
						message:"注册成功,是否直接登录?",
						buttons:[
							{text: '是', itemId: 'yes', ui: 'action'},
				            {text: '否', itemId: 'no'}
				        ],
						width:500,
						fn:function(y){
						   if(y=='yes'){
						      var doMain=Ext.getCmp('domainTab');
							  if (!doMain){
								  doMain=Ext.create('DDMS.view.DomainTab');
							  }
						      Ext.Viewport.animateActiveItem(doMain,{
						          type: 'pop',
						          duration: 250
							  });
						   } else {
						   	  Ext.Viewport.animateActiveItem(Ext.getCmp('tablet'),{
					              type: 'slide',
					              direction: 'right',
					              duration: 250
					    	  });   
						   }
						}
					});
                },
                height:60
            },
            {
                xtype : 'toolbar',
                ui: 'neutral',
                height:80,
                docked: 'top',
                width:'100%',
                scrollable: null,
                style:'font-size:18pt;padding-top:17pt;',
                title:'创建账户',
                items:[
                {
            		xtype:'button',
           			ui: 'back',
           			id:'register-back-btn',
           			name:'register-back-btn',
           			text: '返回'
	           	}
                ]
            }
        ]
    }
});